home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / prolog / pdprolog / ac_fix.pro next >
Text File  |  1986-05-05  |  19KB  |  670 lines

  1. /*
  2. Note: Carl is an A.D.A. PROLOG user who has contributed this program for
  3. the enjoyment of others.
  4.  
  5.           Residential Air Conditioning Diagnosis System
  6.                          by Carl Bredlau
  7.                         909 Rahway Avenue
  8.                    Westfield, New Jersey 07090
  9. */
  10.  
  11.  
  12. nothing(X)  :-
  13.      print('Is there a/c (y/n)? '),
  14.      ratom(n), !, X = running,
  15.      asserta( (nothing(running) :- !) ).
  16.  
  17. nothing(X)   :-
  18.       print('I can not diagnose this.  Will quit'), nl,
  19.       asserta( (nothing(running) :- (!, fail)) ), fail.
  20.  
  21. check(thermostat_system_switch) :-
  22.       nothing(running).
  23.  
  24.  
  25. check(thermostat_fan_switch) :-
  26.       check(thermostat_system_switch),
  27.       switch(thermostat_system_switch,'in the cool position',yes).
  28.       thermostat(calling).
  29.  
  30. check(for_air)   :-
  31.      check(thermostat_fan_switch),
  32.      switch(thermostat_fan_switch,on,yes),
  33.      fan(furnace,on).
  34.  
  35. check(furnace_24_volts) :-
  36.        check(thermostat_fan_switch),
  37.        switch(thermostat_fan_switch,on,yes),
  38.        fan(furnace,off).
  39.  
  40. check(furnace_110_volts) :-
  41.     check(furnace_24_volts),
  42.     voltage(furnace,24,no).
  43.  
  44. check(service_switch) :-
  45.      check(furnace_110_volts),
  46.      voltage(furnace,110,no).
  47.  
  48. check(circuit_breaker) :-
  49.       check(service_switch),
  50.       voltage('service switch',line,110,no).
  51.  
  52. check(coil_of_fan_relay) :-
  53.       check(furnace_24_volts),
  54.       voltage(furnace,24,yes).
  55.  
  56. check(fan,closed_coil_relays) :-
  57.       check(coil_of_fan_relay),
  58.       voltage( fan_relay_coil,24,yes).
  59.  
  60. check(Which,continuity_at_relay_coil) :-
  61.       check(Which,closed_coil_relays),
  62.       coil_contacts(Which,open).
  63.  
  64. check(Which,voltage_at_motor) :-
  65.       check(Which,closed_coil_relays),
  66.       coil_contacts(Which,closed).
  67.  
  68. check(Which,over_amp) :-
  69.      check(Which,voltage_at_motor),
  70.      motor_voltage(Which,line,yes),
  71.      motor(Which,running,no),
  72.      motor(Which,hot,yes),
  73.      print( Which, 'motor has internal overload -- thermal relay kicked off'), nl,
  74.      print( 'Cool and check for overamperage'), nl.
  75.  
  76. check(Which,motor_continuity) :-
  77.      (check(Which,voltage_at_motor);
  78.       (Which = compressor, check(continuity_at_compressor) )),
  79.      motor_voltage(Which,line,yes),
  80.      motor(Which,running,no),
  81.      motor(Which,hot,no).
  82.  
  83. check(condensing_unit) :-
  84.     check(for_air),
  85.     air(yes),
  86.     switch(system_cooling_switch,on,yes).
  87.  
  88. check(condenser_24_volts) :-
  89.     check(condensing_unit),
  90.     fan(condenser,off),
  91.     voltage(condenser,220,yes).
  92.  
  93. check(condensing_unit_breaker) :-
  94.      check(condensing_unit),
  95.      fan(condenser,off),
  96.      voltage(condenser,220,no),
  97.      switch(disconnect,on,yes).
  98.  
  99. check(compressor_contactor_coil) :-
  100.      check(condenser_24_volts),
  101.      voltage(condenser,24,yes).
  102.  
  103. check(condenser,closed_coil_relays) :-
  104.      check(compressor_contactor_coil),
  105.      voltage(compressor_contactor_coil,24,yes),
  106.      safeties(yes).
  107.  
  108. check(compressor_voltage) :-
  109.      check(condensing_unit),
  110.      fan(condenser,on),
  111.      voltage(condenser,220,yes),
  112.      voltage(condenser,24,yes),
  113.      coil_contacts(compressor,closed),
  114.      motor(compressor,running,no).
  115.  
  116. check(compressor_internals_overload) :-
  117.      check(compressor_voltage),
  118.      motor_voltage(compressor,line,yes).
  119.  
  120.  
  121. check(continuity_at_compressor) :-
  122.      check(compressor_internals_overload),
  123.      coil_contacts(compressor_internals,closed).
  124.  
  125. check(gauges) :-
  126.      check(condensing_unit),
  127.      fan(condenser,on),
  128.      voltage(condenser,220,yes),
  129.      voltage(condenser,24,yes),
  130.      coil_contacts(compressor,closed),
  131.      motor(compressor,running,yes),
  132.      gauge(X).
  133.  
  134.  
  135.  
  136.  
  137. diagnosed(burned_out_transformer) :-
  138.         check(furnace_110_volts),
  139.         voltage(furnace,110,yes),
  140.         print('Transformer burned out. Replace transformer'),nl.
  141.  
  142.  
  143. diagnosed(repair_line_voltage_wire) :-
  144.        check(service_switch),
  145.        voltage('service switch',lOad,110,yes),
  146.        print( 'Repair line voltage wire'), nl.
  147.  
  148.  
  149. diagnosed(replace_service_switch) :-
  150.         check(service_switch),
  151.         voltage('service switch',lOad,110,no),
  152.         voltage('service switch',line,110,yes),
  153.         print( 'Replace service switch if switch is on'), nl,
  154.         print( 'Otherwise, turn on switch'), nl.
  155.  
  156. diagnosed(replace_circuit_breaker) :-
  157.         check(circuit_breaker),
  158.         voltage('circuit breaker',lOad,110,no),
  159.         voltage('circuit breaker',line,110,yes),
  160.         breaker(circuit,on),
  161.         print( 'Replace circuit breaker' ), nl.
  162.  
  163. diagnosed(repair_circuit_wire) :-
  164.         check(circuit_breaker),
  165.         voltage( 'service switch',line,110,no),
  166.         voltage( 'circuit breaker',lOad,110,yes),
  167.         print( 'Repair wire between circuit breaker and switch'),
  168.         nl.
  169.  
  170. diagnosed(breaker_switch) :-
  171.          check(circuit_breaker),
  172.          breaker(circuit,off),
  173.          print( 'Please turn on the breaker'), nl.
  174.  
  175. diagnosed(check_for_grounds) :-
  176.         check(circuit_breaker),
  177.         breaker(circuit,tripped),
  178.         print('Check for grounded load'), nl,
  179.         print('i.e., motor, relay, transformer, burnt ground wire'),nl.
  180.  
  181. diagnosed(replace_subbase) :-
  182.        check(coil_of_fan_relay),
  183.        voltage( fan_relay_coil,24,no),
  184.        print('Jump R to G at thermostat'),nl,
  185.        fan_turns(furnace,yes),
  186.        print('Replace subbase of thermostat'), nl.
  187.  
  188.  
  189. diagnosed(replace_therm_wire) :-
  190.        check(coil_of_fan_relay),
  191.        voltage( fan_relay_coil,24,no),
  192.        fan_turns(furnace,no),
  193.        print('Look for open wire between thermostat and subbase'), nl.
  194.  
  195. diagnosed([Which,replace_relay]) :-
  196.       check(Which,continuity_at_relay_coil),
  197.       continuity(Which,no),
  198.       print( 'Replace ',Which, ' relay'), nl.
  199.  
  200. diagnosed([Which,replace_relay]) :-
  201.       check(Which,continuity_at_relay_coil),
  202.       continuity(Which,yes),
  203.       print( 'Check for mechanical failure and replace ',Which, ' relay'), nl.
  204.  
  205. diagnosed([Which,repair_wire]) :-
  206.      check(Which,voltage_at_motor),
  207.      motor_voltage(Which,line,no),
  208.      print( 'Repair wire between relay and ',Which,'?'), nl.
  209.  
  210. diagnosed([Which,replace_motor_or_adjust_pulley]) :-
  211.      check(Which,over_amp),
  212.      motor(Which,over_amperage,yes),
  213.      print( 'With direct drive replace motor.'),nl,
  214.      print( 'With pulley drive adjust pulley to proper amperage'),nl.
  215.  
  216. diagnosed([Which,replace_motor]) :-
  217.      check(Which,motor_continuity),
  218.      continuity(Which,no),
  219.      print('Replace ',Which,' motor'),nl.
  220.  
  221. diagnosed([Which,look_at_capacitor]) :-
  222.      check(Which,motor_continuity),
  223.      continuity(Which,yes),
  224.      motor(Which,hum,yes),
  225.      print('Look at the ',Which,' motor capacitor'),nl.
  226.  
  227. diagnosed(dirty_stuff) :-
  228.      check(for_air),
  229.      air(no),
  230.      maintenance(List),
  231.      perform_maintenance(List).
  232.  
  233. diagnosed(replace_thermostat) :-
  234.     check(condenser_24_volts),
  235.     voltage(condenser,24,no),
  236.     print('Jump out R to Y at thermostat'),
  237.     fan_turns(condenser,yes),
  238.     print('Replace thermostat'), nl.
  239.  
  240. diagnosed(repair_condenser_wire) :-
  241.     check(condenser_24_volts),
  242.     voltage(condenser,24,no),
  243.     fan_turns(condenser,no),
  244.     print('Repair wire between thermostat and condenser'),nl,
  245.     print('Check 24 volt source'),nl.
  246.  
  247.  
  248.  
  249. diagnosed(replace_condensing_unit_breaker) :-
  250.         check(condensing_unit_breaker),
  251.         voltage('condensing unit breaker',lOad,110,no),
  252.         voltage('condensing unit breaker',line,110,yes),
  253.         breaker(condensing_unit,on),
  254.         print( 'Replace condensing unit breaker' ), nl.
  255.  
  256. diagnosed(repair_condensing_unit_wire) :-
  257.         check(condensing_unit_breaker),
  258.         voltage( 'condensing unit breaker',lOad,110,yes),
  259.         print( 'Repair wire between condensing unit breaker and switch'),
  260.         nl.
  261.  
  262. diagnosed(condensing_unit_switch) :-
  263.          check(condensing_unit_breaker),
  264.          breaker(condensing_unit,off),
  265.          print( 'Please turn on the condensing unit breaker'), nl.
  266.  
  267.  
  268. diagnosed(check_for_condensing_unit_grounds) :-
  269.         check(condensing_unit_breaker),
  270.         breaker(condensing_unit,tripped),
  271.         print('Check for grounded load'), nl,
  272.         print('i.e., motor, relay, transformer, burnt ground wire'),nl.
  273.  
  274.  
  275. diagnosed(safeties_open) :-
  276.      check(compressor_contactor_coil),
  277.      voltage(compressor_contactor_coil,24,no),
  278.      safeties(no),
  279.      print('Check safeties'),nl.
  280.  
  281. diagnosed(compressor_contactor) :-
  282.      check(compressor_voltage),
  283.      motor_voltage(compressor,line,no),
  284.      print('Check for contactor problem or wire open'), nl.
  285.  
  286. diagnosed(refrigerant_charge) :-
  287.      check(compressor_internals_overload),
  288.      coil_contacts(compressor_internals,open),
  289.      motor(compressor,hot,yes),
  290.      print( 'Cool and check refrigerant charge'), nl.
  291.  
  292. diagnosed(replace_compressor) :-
  293.      check(compressor_internals_overload),
  294.      coil_contacts(compressor_internals,open),
  295.      motor(compressor,hot,no),
  296.      print( 'Replace compressor'), nl.
  297.  
  298. diagnosed(defective_condenser_fan) :-
  299.      check(condensing_unit),
  300.      fan(condenser,off),
  301.      voltage(condenser,220,yes),
  302.      voltage(condenser,24,yes),
  303.      coil_contacts(compressor,closed),
  304.      motor(compressor,running,yes),
  305.      print('Defective condenser fan'),nl.
  306.  
  307. diagnosed(leak) :-
  308.     check(gauges),
  309.     pressure(high,High),
  310.     pressure(low,Low),
  311.     Low = 0, High = 0,
  312.     print('Find leak, repair, and recharge'),nl.
  313.  
  314. diagnosed(replace_compressor) :-
  315.     check(gauges),
  316.     pressure(high,High),
  317.     pressure(low,Low),
  318.     60 =< Low, Low =< 90,
  319.     60 =< High, High =< 90,
  320.     Diff is High - Low,
  321.     Diff =< 10,
  322.     motor(compressor,drawing_amperage,yes),
  323.     print('Pressures are almost equal.  Replace compressed'),nl.
  324.  
  325. diagnosed(low_pressure) :-
  326.     check(gauges),
  327.     pressure(low,Low),
  328.     Low =< 40,
  329.     print('(1) Check for lack of maintenance on inside'), nl,
  330.     maintenance(X),
  331.     print_maintenance_start(X),
  332.     print('(2) short of coolant'), nl,
  333.     print('(3) restriction in refrigerant line'), nl,
  334.     print('(4) expansion valve problem'), nl.
  335.  
  336. diagnosed(high_pressure) :-
  337.     check(gauges),
  338.     pressure(high,High),
  339.     High >= 300,
  340.     print('(1) Lack of maintenance on outside : compressor plugged'),nl,
  341.     print('(2) Overcharged unit'),nl.
  342.  
  343.  
  344. diagnosed(compressor_valve) :-
  345.     check(gauges),
  346.     pressure(low,Low),
  347.     pressure(high,High),
  348.     65 =< Low, Low =< 70,
  349.     220 =< High, High =< 280,
  350.     maintenance(X),
  351.     print_maintenance_start(X),
  352.     motor(compressor,low_amperage,yes),
  353.     print('Possible broken compressor valve. Replace'),nl.
  354.  
  355.  
  356. diagnosed(replace_compressor) :-
  357.     check(gauges),
  358.     pressure(low,Low),
  359.     pressure(high,High),
  360.     65 =< Low, Low =< 70,
  361.     220 =< High, High =< 280,
  362.     maintenance(X),
  363.     print_maintenance_start(X),
  364.     motor(compressor,high_amperage,yes),
  365.     print('Compressor worn out. Replace'), nl.
  366.  
  367.  
  368.  
  369.  
  370. possibilities( [
  371.      burned_out_transformer,
  372.      replace_service_switch,
  373.      repair_line_voltage_wire,
  374.      replace_circuit_breaker,
  375.      repair_circuit_wire,
  376.      breaker_switch,
  377.      check_for_grounds,
  378.      replace_subbase,
  379.      repair_therm_wire,
  380.      [fan,replace_relay],
  381.      [fan,repair_wire],
  382.      [fan,replace_motor_or_adjust_pulley],
  383.      [fan,replace_motor],
  384.      [fan,look_at_capacitor],
  385.      dirty_stuff,
  386.      replace_thermostat,
  387.      repair_condenser_wire,
  388.      replace_condensing_unit_breaker,
  389.      repair_condensing_unit_wire,
  390.      condensing_unit_switch,
  391.      check_for_condensing_unit_grounds,
  392.      safeties_open,
  393.      [condenser,replace_relay],
  394.      [condenser,repair_wire],
  395.      [condenser,replace_motor_or_adjust_pulley],
  396.      [condenser,replace_motor],
  397.      [condenser,look_at_capacitor],
  398.      compressor_contactor,
  399.      refrigerant_charge,
  400.      replace_compressor,
  401.      [compressor,replace_motor],
  402.      [compressor,look_at_capacitor],
  403.      defective_condenser_fan,
  404.      leak,
  405.      low_pressure,
  406.      high_pressure,
  407.      compressor_valve
  408.   ]).
  409.  
  410. begin :-
  411.     print('Expert a/c system'), nl,
  412.     possibilities(X),
  413.     begin1(X).
  414.  
  415. begin1([]) :-
  416.     print('Seems I could not find the problem'), nl,
  417.     print('Better luck next time'), !.
  418.  
  419. begin1([H|T]) :-
  420.        diagnosed(H), ! ,
  421.        print('We diagnosed ',H), nl,
  422.        print('I hope that this is it'), nl.
  423.  
  424. begin1([H|T]) :-
  425.        !, begin1(T).
  426.  
  427.  
  428.  
  429.  
  430.  
  431. switch(Switch,How,YesNo) :-
  432.         print('Is the ',Switch,' ',How,' (y/n)? '),
  433.         ratom(y),
  434.         !,
  435.         asserta( (switch(Switch,How,Y) :- (!, Y = yes)) ),
  436.         YesNo = yes.
  437.  
  438. switch(Switch,How,YesNo) :-
  439.         print('Please turn on the ',Switch, ' now'), nl,
  440.         asserta( (switch(Switch,How,Y) :- (!, Y = yes)) ),
  441.         YesNo = yes.
  442.  
  443. thermostat(X) :-
  444.         print('Is the thermostat calling (y/n)? '),
  445.         ratom(y),
  446.         !,
  447.         asserta( (thermostat(Y) :- (!, Y = calling)) ),
  448.         X = calling.
  449.  
  450. thermostat(X) :-
  451.         print('Please make call for cooling'),
  452.         asserta( (thermostat(Y) :- (!, Y = calling)) ),
  453.         X = calling.
  454.  
  455. fan(Which,OnOff) :-
  456.         print('Do you hear the ',Which,' fan (y/n)? '),
  457.         ratom(y),
  458.         !,
  459.         asserta( (fan(Which,Y) :- (!, Y = on)) ),
  460.         OnOff = on.
  461.  
  462. fan(Which,OnOff) :-
  463.         asserta( (fan(Which,Y) :- (!, Y = off)) ),
  464.         OnOff= off.
  465.  
  466. voltage(X,Y,Volts,Z)   :-
  467.        print( 'Is there ', Volts, ' volts on the ',
  468.        Y, ' side of the ',
  469.        X, ' (y/n)?  '),
  470.        ratom(y),
  471.        !,
  472.        asserta( (voltage(X,Y,Volts,W) :- (!, W = yes)) ),
  473.        Z = yes.
  474.  
  475. voltage(X,Y,Volts,Z)   :-
  476.        asserta( (voltage(X,Y,Volts,W) :- (!, W = no)) ),
  477.        Z = no.
  478.  
  479. voltage(X,Volts,Z)   :-
  480.        print( 'Is there ', Volts, ' volts at the ',
  481.        X, '? (y/n) '),
  482.        ratom(y),
  483.        !,
  484.        asserta( (voltage(X,Volts,W) :- (!, W = yes)) ),
  485.        Z = yes.
  486.  
  487. voltage(X,Volts,Z)   :-
  488.        asserta( (voltage(X,Volts,W) :- (!, W = no)) ),
  489.        Z = no.
  490.  
  491. motor_voltage(X,Volts,Z)   :-
  492.        print( 'Is there ', Volts, ' volts at the ',
  493.        X, ' motor? (y/n) '),
  494.        ratom(y),
  495.        !,
  496.        asserta( (motor_voltage(X,Volts,W) :- (!, W = yes)) ),
  497.        Z = yes.
  498.  
  499. motor_voltage(X,Volts,Z)   :-
  500.        asserta( (motor_voltage(X,Volts,W) :- (!, W = no)) ),
  501.        Z = no.
  502.  
  503.  
  504.  
  505.  
  506. breaker(Which,X)  :-
  507.         print('Is the ',X,' breaker tripped (y/n)? '),
  508.         ratom(y),
  509.         !,
  510.         asserta( (breaker(Which,Y) :- (!, Y = tripped)) ),
  511.         X = tripped.
  512.  
  513. breaker(Which,X)  :-
  514.      print('Is the breaker on (y/n)'),
  515.      ratom(y),
  516.      !,
  517.      asserta( (breaker(Which,Y) :- (!, Y = on)) ),
  518.      X = on.
  519.  
  520.  
  521. breaker(Which,X)  :-
  522.      asserta( (breaker(Which,Y) :- (!, Y = off)) ),
  523.      X = off.
  524.  
  525. fan_turns(Which,X) :-
  526.         print('Does the ',Which, ' fan turn now (y/n)? '),
  527.         ratom(y),
  528.         !,
  529.         asserta( (fan_turns(Which,Y) :- (!, Y = yes)) ),
  530.         X = yes.
  531.  
  532. fan_turns(Which,X) :-
  533.         asserta( (fan_turns(Which,Y) :- (!, Y = no)) ),
  534.         X = no.
  535.  
  536.  
  537. coil_contacts(Which,X)  :-
  538.      print('Are the ',Which, ' contacts open (y/n)? '),
  539.      ratom(y),
  540.      !,
  541.      asserta( (coil_contacts(Which,Y) :- (!, Y = open)) ),
  542.      X = open.
  543.  
  544. coil_contacts(Which,X)  :-
  545.      asserta( (coil_contacts(Which,Y) :- (!, Y = closed)) ),
  546.      X = closed.
  547.  
  548.  
  549. continuity(Device,YesNo) :-
  550.         print('Is there continuity at the ',Device,' (y/n)? '),
  551.         ratom(y),
  552.         !,
  553.         asserta( (continuity(Device,Y) :- (!, Y = yes)) ),
  554.         YesNo = yes.
  555.  
  556. continuity(Device,YesNo) :-
  557.         asserta( (continuity(Device,Y) :- (!, Y = no)) ),
  558.         YesNo = no.
  559.  
  560. motor(Which,How,YesNo) :-
  561.         print('Is the ',Which, ' motor ',How,' (y/n)? '),
  562.         ratom(y),
  563.         !,
  564.         asserta( (motor(Which,How,Y) :- (!, Y = yes)) ),
  565.         YesNo = yes.
  566.  
  567. motor(Which,How,YesNo) :-
  568.         asserta( (motor(Which,How,Y) :- (!, Y = no)) ),
  569.         YesNo = no.
  570.  
  571. air(X)  :-
  572.         print('Do you hear any air (y/n)? '),
  573.         ratom(y),
  574.         !,
  575.         asserta( (air(Y) :- (!, Y = yes)) ),
  576.         X = yes.
  577.  
  578. air(X) :-
  579.         asserta( (air(Y) :- (!, Y = no)) ),
  580.         X = no.
  581.  
  582. perform_maintenance([]) :- !.
  583. perform_maintenance([[Symptom,Action] | Tail]) :-
  584.      do_maintenance(Symptom,Action),
  585.      perform_maintenance(Tail).
  586.  
  587. do_maintenance(Symptom,Action) :-
  588.      print('Is there a ',Symptom,'? (y/n)'),
  589.      ratom(y), !,
  590.      print(Action),nl.
  591. do_maintenance(Symptom,Action).
  592.  
  593. maintenance( [
  594.      [plugged_filter, replace],
  595.      [broken_or_loose_belt, replace],
  596.      [plugged_coil, clean],
  597.      [dirty_blower_wheel, clean],
  598.      [plugged_return_grill, clean],
  599.      [closed_grill,open],
  600.      [plugged_grill,clean] ]).
  601.  
  602.  
  603.  
  604. check_safeties([],Num) :- !, Num is 0.
  605. check_safeties([[Safety,Action] | Tail], Num) :-
  606.      ! ,
  607.      check_safety(Safety,Action,Num1),
  608.      check_safeties(Tail, Num2),
  609.      Num is Num1 + Num2.
  610.  
  611. check_safety(Safety,Action, Num) :-
  612.      print('Is the ',Safety,' safety open (y/n)?'),
  613.      ratom(y), !,
  614.      print(Action) ,nl,
  615.      Num is 1.
  616.  
  617. check_safety(Symptom,Action,Num ) :- Num is 0.
  618.  
  619. safety_list( [
  620.      [high_pressure,
  621.        'Check for clogged condenser coils, condenser fan motor problem, overcharged unit'],
  622.      [low_pressure,'Check for loss of refrigerant'],
  623.      [compressor_internal,
  624.        'Low refrigerant charge, expansion valve problems, filters, belts coils, compressor amperage']
  625.            ]).
  626.  
  627. safeties(X)  :-
  628.         safety_list(List),
  629.         check_safeties(List,Num),
  630.         Num = 0,
  631.         !,
  632.         asserta( (safeties(Y) :- (!, Y = yes)) ),
  633.         X = yes.
  634.  
  635. safeties(X) :-
  636.         asserta( (safeties(Y) :- (!, Y = no)) ),
  637.         X = no.
  638.  
  639.  
  640. gauge(X) :-
  641.         print('Install gauges'), nl,
  642.         asserta(( gauge(X) :- !)).
  643.  
  644.  
  645. pressure(HighLowSide,Pounds) :-
  646.         print('What is the pressure on the ',HighLowSide,' (end # with .)? '),
  647.         read(Pounds),
  648.         asserta((pressure(HighLowSide,Pounds) :- !)).
  649.  
  650.  
  651.  
  652. print_maintenance_start(X) :-
  653.     print('Be sure that the maintenance has been done first'), nl,
  654.     print_maintenance(X),
  655.     asserta( (print_maintenance_start(Y) :- !) ).
  656.  
  657.  
  658. print_maintenance([]) :- !.
  659. print_maintenance([Head | Tail] ) :-
  660.     print('     '),
  661.     Head = [Symptom, Stuff], print(Symptom),nl,
  662.     print_maintenance(Tail).
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.